<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>酒店后台管理系统</title>
<jsp:include page="../commonCss.jsp" />
</head>
<body>
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo layui-hide-xs layui-bg-black">酒店后台管理系统</div>
			<div class="layui-nav layui-layout-right" style="height: 100%;line-height: 30px;padding-right:60px;">
				<div>
					<a href="${pageContext.request.contextPath}/views/admin/user/login.jsp"
						style="color: #fff;">退出登录</a>
				</div>
				<div>
					<span style="color: #ff0066;">管理员：<%=request.getSession().getAttribute("username")%></span>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="color: #ff0066;">登录时间：<%=request.getSession().getAttribute("loadtime")%></span>
				</div>
			</div>
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="test">
					<li class="layui-nav-item">
					    <a class="" href="javascript:;">用户管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="${pageContext.request.contextPath}/views/admin/user/login.jsp">管理员登录</a>
							</dd>
							<dd>
								<a href="${pageContext.request.contextPath}/views/admin/user/register.jsp">管理员注册</a>
							</dd>
                            <dd>
                                <a id="dddd" href="${pageContext.request.contextPath}/views/admin/user/userlist.jsp">用户详情</a>
                            </dd>
						</dl>
					</li>
					<li class="layui-nav-item">
					    <a class="" href="javascript:;">入住管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a id="dddd" href="${pageContext.request.contextPath}/views/admin/order/orderadd.jsp">入住登记</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
					    <a class="" href="javascript:;">客户订单管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a id="dddd" href="${pageContext.request.contextPath}/views/admin/order/orderlist.jsp">订单管理</a>
							</dd>
						</dl>
					</li>
					<li class="layui-menu-item-divider"></li>
					<li class="layui-nav-item">
					    <a class="" href="javascript:;">房间管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a id="dddd" href="${pageContext.request.contextPath}/views/admin/room/roomadd.jsp">新增房间</a>
							</dd>
							<dd>
								<a id="dddd" href="${pageContext.request.contextPath}/views/admin/room/roomlist.jsp">查询房间</a>
							</dd>
						</dl></li>
					<%-- <li class="layui-nav-item">
						<a id="dddd" href="${pageContext.request.contextPath}/views/admin/total/totallist.jsp">统计管理</a>
					</li> --%>
				</ul>
			</div>
		</div>
		<div class="layui-body" style="padding-bottom:0px;">
		    <iframe id="iframeMain" src="splash.jsp" style="width: 100%"; height="100%"; frameborder="no" border="0"></iframe>
		</div>
	</div>
</body>
<!-- 引入 layui.js -->
<script src="https://layui.11dz.cn/layui-v2.6.8/layui/layui.js"></script>
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.6.0.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/js/jquery-cookie.js"></script>
<script>
	//JS 
	layui.use('layer', function(){
	  var layer = layui.layer;
	  if(<%=request.getSession().getAttribute("username")%> !=null){
		  layer.msg("欢迎来到酒店后台管理系统");
         }else{
       	  alert("请登录");
       	  window.open("${pageContext.request.contextPath}/views/admin/user/login.jsp");
         }
	});
	$(document).ready(function(){
		$("dd>#dddd").click(function (e) {
			e.preventDefault();
			$("#iframeMain").attr("src",$(this).attr("href"));
		});
	});
</script>
</html>